Skip to content

Suppress usage reporting in AP mode#335

Open
Copilot wants to merge 6 commits intomdevfrom
copilot/suppress-usage-reporting-ap-mode
Open

Suppress usage reporting in AP mode#335
Copilot wants to merge 6 commits intomdevfrom
copilot/suppress-usage-reporting-ap-mode

Conversation

Copy link

Copilot AI commented Feb 4, 2026

Usage reporting attempts to contact usage.wled.me during AP mode when no internet connectivity exists.

Changes

Added IP address check in checkVersionUpgrade() to skip version reporting when device is in AP mode:

function checkVersionUpgrade(info) {
	if (versionCheckDone) return;
	versionCheckDone = true;

	// Skip version check in AP mode (no internet connectivity)
	if (!info.ip || info.ip === '0.0.0.0') {
		console.log('Skipping version check in AP mode (no IP address)');
		return;
	}

	// Fetch version-info.json...

When Network.isConnected() is false, info.ip returns empty string (see json.cpp:1272). This check prevents the upgrade dialog from appearing when connectivity is unavailable.

Original prompt

This section details on the original issue you should resolve

<issue_title>Usage reporting trigger during ap mode</issue_title>
<issue_description>The upgrade usage reporting should be suppressed during ap mode as there will be no connectivity to the usage server</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 3 commits February 4, 2026 18:23
Co-authored-by: netmindz <442066+netmindz@users.noreply.github.com>
Co-authored-by: netmindz <442066+netmindz@users.noreply.github.com>
Co-authored-by: netmindz <442066+netmindz@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix usage reporting during AP mode Suppress usage reporting in AP mode Feb 4, 2026
Copilot AI requested a review from netmindz February 4, 2026 18:29
@softhack007 softhack007 added this to the 14.7.3 milestone Feb 5, 2026
as recommended by the rabbit
@softhack007 softhack007 marked this pull request as ready for review February 6, 2026 16:06
@netmindz
Copy link
Collaborator

netmindz commented Feb 6, 2026

in upstream it's just

if (info.wifi && info.wifi.ap) return;

@softhack007
Copy link
Collaborator

softhack007 commented Feb 6, 2026

in upstream it's just

if (info.wifi && info.wifi.ap) return;

👌

https://github.com/wled/WLED/blob/4d63b3c8a0569f72cecf177f98ab26c3e733c60a/wled00/json.cpp#L793-L799

I'll check if I can can backport that.

Edit: WLED also has the "ap always" mode, which means that both the AP and a normal STA connection could be active at the same time.

@netmindz
Copy link
Collaborator

netmindz commented Feb 6, 2026

Edit: WLED also has the "ap always" mode, which means that both the AP and a normal STA connection could be active at the same time.

Ah I didn't know about that, what is the use case for that?

@softhack007
Copy link
Collaborator

in upstream it's just

if (info.wifi && info.wifi.ap) return;

you can now use the same as in upstream. i've added info.wifi.ap to the /json/info endpoint with the last commit in this PR.

@softhack007
Copy link
Collaborator

Ah I didn't know about that, what is the use case for that?

long time since I tried that. I think it was for "emergencies" where the device still has the Wifi credentials stored in flash, but you want to use WLED-AP to change that. 🤔 which sounds like some kind of backdoor for exploits tbh 🤣

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Usage reporting trigger during ap mode

3 participants